#
# This file sets up include directories, link directories, and
# compiler settings for a project to use SimpleITK.  It should not be
# included directly, but rather through the SimpleITK_USE_FILE setting
# obtained from SimpleITKConfig.cmake.
#

# Add compiler flags needed to use SimpleITK.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SimpleITK_REQUIRED_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SimpleITK_REQUIRED_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SimpleITK_REQUIRED_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SimpleITK_REQUIRED_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SimpleITK_REQUIRED_LINK_FLAGS}")

# Add include directories needed to use SimpleITK.
include_directories(${SimpleITK_INCLUDE_DIRS})

# Add link directories needed to use SimpleITK.
link_directories(${SimpleITK_LIBRARY_DIRS})

# Add itk and elastix needed to use SimpleElastix.
set( ITK_NO_IO_FACTORY_REGISTER_MANAGER 1 )
include( ${ITK_USE_FILE} )
include( ${ELASTIX_USE_FILE} )
